<script setup lang="ts">
import { ref } from 'vue';

let isshow=ref(true);
isshow.value=false;

let unshow=()=>{
    isshow.value=!isshow.value;
}
</script>
<template>
    <div>   
        <h1 v-if="isshow">大海</h1>
        <h1 v-else>森林</h1>
        <div>
            <button @click="unshow">显示</button>
        </div>
        <p v-show="isshow">我是草原</p>
    </div>
</template>
<style scoped></style>